package com.jay.lang.management.intf;

import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;

public class MemoryMXBeanIntf {
	public static void main(String[] args) throws IOException {
		MemoryMXBean mxbean = ManagementFactory.getMemoryMXBean();
		System.out.println("----------------");
		System.out.println(mxbean.toString());
		System.out.println(mxbean.getClass());
		System.out.println(mxbean.getObjectName());
		System.out.println(mxbean.getObjectPendingFinalizationCount());
		System.out.println(mxbean.getHeapMemoryUsage());
		System.out.println(mxbean.getNonHeapMemoryUsage());
		System.out.println(mxbean.isVerbose());
	}
}
